package com.work.device.pojo;

import com.alibaba.fastjson.annotation.JSONField;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import javax.persistence.Id;
import javax.persistence.Table;
import java.math.BigInteger;

/*
Include.Include.ALWAYS 默认
Include.NON_DEFAULT 属性为默认值不序列化
Include.NON_EMPTY 属性为 空（""） 或者为 NULL 都不序列化
Include.NON_NULL 属性为NULL 不序列化
*/

@Table(name = "t_user")
@Data
@AllArgsConstructor
@NoArgsConstructor
@JsonInclude(JsonInclude.Include.NON_EMPTY)
/*@JsonSerialize(include = JsonSerialize.Inclusion.NON_NULL)*/
public class UserInfo {

    @Id
    private BigInteger id;
    private String name;
    private String username;
    private String password;
    private String email;
    private String phone;
    private String status;
}
